package com.springboot.controller;

import com.springboot.mapper.StuMapper;
import com.springboot.model.Stu;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class AddController {
    @Resource
    private StuMapper stuMapper;

    @RequestMapping("/springboot")
    public String addController(){
        Stu stu = new Stu();
        stu.setName("a");
        stu.setGrade(9);
        stu.setScore(99);
        stuMapper.insert(stu);
        return "+1";

    }

}
